#include "head.h"

extern char ip[64];
extern char port[32];


int client_init(config* config_info,shared_resource_t* pshared_resource,bool* is_connect, pool_data_t* pool_data, int* socket_fd){
    // 子线程的个数
    int num = config_info -> pthread_count;
    strcpy(ip,config_info -> server_ip);
    strcpy(port,config_info -> server_port);
    tcp_init(socket_fd, config_info -> server_ip, config_info -> server_port);
    *is_connect = true;
    shared_resource_init(pshared_resource);
    pool_init(pool_data, num, pshared_resource);
    return 0;
}
